package com.bonc.ioc.service;

import com.bonc.ioc.base.page.PageData;
import com.bonc.ioc.base.page.PageResult;
import com.bonc.ioc.model.Knowledges;
import com.bonc.ioc.vo.DirectoryVo;
import com.bonc.ioc.vo.KnowledgesVo;
import com.bonc.ioc.vo.PageVo;
import org.springframework.validation.BindException;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author liuyang
 * @creats 2021-04-08-18:02
 */
public interface ScientificService {
    /**
     * 获取分页数据
     * @param map 分页
     * @return com.bonc.ioc.base.page.PageResult
     * @throws BindException
     */
    PageResult selectStandardInfoByPage(HashMap map) throws BindException;

    /**
     * 获取知识产权 详情
     * @param id 主键id
     * @return com.bonc.ioc.vo.KnowledgesVo
     */
    KnowledgesVo selectByScientificId(Long id);

    /**
     * 更新下载量
     * @param id 主键id
     * @return int
     */
    int updateDownloadsNum(Long id);

    /**
     * 更新访问量
     * @param id 主键id
     */
    int updateVisitNum(Long id);

    /**
     * 根据关键字查找title
     * @param keys 关键字
     * @return List<KnowledgesVo>
     */
    Map<String,Object> selectTitleBykeys(Integer id ,String keys,String title);

    /**
     * 根据创建查找title
     * @param pageSize 默认为5
     * @param pageNum 默认为0
     * @return List<KnowledgesVo>
     */
    List<KnowledgesVo> selectByCreateTime(String pageSize,String pageNum);

    /**
     * 获取分类
     * @param value KNOWLEDGEDIRECTORYTYPE
     * @return List<DirectoryVo>
     */
    List<DirectoryVo> getScientificDirs(String value);
}
